package com.huike.review.service.impl;

import com.huike.common.core.domain.AjaxResult;
import com.huike.review.pojo.Review;
import com.huike.review.service.ReviewService;
import com.huike.review.mapper.MybatisReviewMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * mybatis复习使用的业务层
 * 注意该业务层和我们系统的业务无关，主要是让同学们快速熟悉系统的
 */
@Service
public class ReviewServiceImpl implements ReviewService {

    @Autowired
    private MybatisReviewMapper reviewMapper;

    @Override
    public int save(String name, Integer age, String sex) {
         return reviewMapper.save(name,age,sex);
    }

    @Override
    public void savePojo(Review review) {
        reviewMapper.savePojo(review);
    }

    @Override
    public void updatePojo(Review review) {
        reviewMapper.update(review);
    }

    @Override
    public void remove(Long id) {
        reviewMapper.remove(id);
    }

    @Override
    public Review selectById(Integer id) {
        return reviewMapper.selectById(id);
    }


}
